//重构
$("#deng").submit(function () {
    console.log(1111111111)
    let userName = $("#username").val();
    let password = $("#password").val();


    let jsonA={
        username : userName,
        password : password
    }
    if (userName==""||password==""){
        alert("账号密码不能为空");
        return false;
    }

})
function dddd() {
    console.log(1111111111)
    let userName = $("#username").val();
    let password = $("#password").val();


    let jsonA={
        username : userName,
        password : password
    }
    $.post("/userLogin/toLogin",jsonA,function (data) {
        console.log(data)
        if (data.error == "success"){
            location.href="/userLogin/index";
        }else {
            layer.msg(data.error);
        }
    })
}



